﻿#pragma once

#include <iostream>
#include <thread>

namespace FL
{
	struct Thread
	{
		enum State
		{
			TH_WAIT, TH_WORKING, TH_END
		}  mState = TH_WAIT;

		std::thread* mThread;

		inline State GetState()
		{
			return mState;
		}
		void Start();
		void Detach();
		void Join();
		bool Joinable();
		virtual void Run() = 0;
	};

}
